Difference between report and input functions

WhizBase input functions are similar to the report functions. They have different syntax (input functions use general syntax $wbfnname {arg} instead of report functions - $wbfnname[arg]), but the main difference is in way of using them. Inserting server’s date/time in the database as record update time, for example, without input functions requires some serious work including unnecessary redirections and resource consuming.

Example:

If you put hidden field in your report like this

<input type="hidden" name="WBF_LastUpdated" value="$WBFN[fdt(dd-mmm-yyyy hh:mm:ss)]">

then, when WBSP engine process this report, this field has value of server's date/time when the page was sent to browser:
<input type="hidden" name="WBF_LastUpdated" value="03-Apr-2008 13:22:47">

This field will have the same value even if the form is submitted hours later, what means that it is completely useless for tracking record update time.

However if you use same function in input syntax WhizBase will ignore it during report processing. To use same function as above, but this time in input syntax simply change the value as follows:

<input type="hidden" name="WBF_LastUpdated" value="$WBFN{fdt(dd-mmm-yyyy hh:mm:ss)}">

WBSP will ignore this function during report processing and visitor's browser will receive exactly the same code as you wrote it in report:

<input type="hidden" name="WBF_LastUpdated" value="$WBFN{fdt(dd-mmm-yyyy hh:mm:ss)}">

As an opposite from previous case it is of no importance how long you will wait before submitting this form. Once you submit the form WBSP will receive
$WBFN{fdt(dd-mmm-yyyy hh:mm:ss)}
as a value for WBF_LastUpdated form field, process it and write exact update time to DB field named LastUpdated.

Because input functions are processed  before opening the database it is not possible to use DB related functions as input functions (except $WBSR and $WBSRQ). Using these functions in input syntax will result with empty string.

Any WB form field can have input function in its value and they can be used both in HTML forms and WBSP files:

WB_Query=$wbif{"$wbv{pg}"=""|PageID=1|PageID=$wbv{pg}}
Or
<input type="hidden" name="WB_TempName" value="$WBFN{HTUser}.htm">